<html>
<head>
    <!-- 引入样式 -->
    <meta charset="utf-8">
    <title>参天大树</title>
    <link rel="icon" href="/img/temp/favicon.ico"/>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="/plugins/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/style.css">
    <link rel="stylesheet" href="../css/index2.css">
    <script src="/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="../js/vue.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="/js/axios.min.js"></script>
    <script src="/controller/indexController.js"></script>
    <style>

    </style>

</head>
<body>
<div id="app">
    <el-container>
        <el-header>

            <div><img class="ctdsimg" src="/img/temp/ctds.png"></div>
            <el-menu :default-active="'1'" class="el-menu-demo" mode="horizontal" @select="handleSelect">
                <el-menu-item index="1">首页</el-menu-item>

                <el-submenu index="2">
                    <template slot="title">考试</template>
                    <el-menu-item index="2-1">我的卷纸</el-menu-item>
                    <el-menu-item index="2-2">我的历史考试记录</el-menu-item>
                </el-submenu>


                <el-submenu index="3">
                    <template slot="title">休闲</template>
                    <el-menu-item index="3-1">超级霸气的雷电</el-menu-item>
                </el-submenu>



                <el-submenu index="4">
                    <template slot="title">个人设置</template>
                    <el-menu-item index="4-1">编辑资料</el-menu-item>
                    <el-menu-item index="4-2">修改密码</el-menu-item>
                </el-submenu>

                <el-menu-item index="5"><a href="/admin/index.html" >切换经典版</a></el-menu-item>
            </el-menu>

            <div class="headeruserdiv">
                <img class="avatarstyle" :src="avatar">

                <el-button type="text" @click="table = true"> {{loginName}}</el-button>
                <el-drawer :visible.sync="table" size="50%">

                    <div style="margin: 0px 366px">
                        <img :src="avatar" class="avatarstyle-bg" alt="User Image">

                        {{loginName}}<br/>
                        <small>最后登录 11:20AM</small>

                        <!--                        <div >-->
                        <!--                            <a href="javascript:;" data-toggle="modal" data-target="#editModal" >头像上传</a>-->
                        <!--                        </div>-->
                        <div>
                            <a href="/logout" class="btn btn-default btn-flat">注销</a>
                        </div>
                    </div>

                </el-drawer>
            </div>

        </el-header>
        <el-container>
            <el-container>
                <el-main>
<!--                    <el-carousel :interval="4000" type="card" height="400px">-->
<!--                        <el-carousel-item v-for="item in itemList" :key="item">-->
<!--                            &lt;!&ndash;                            <h3 class="medium">{{ item }}</h3>&ndash;&gt;-->
<!--                            <img :src="item">-->
<!--                        </el-carousel-item>-->
<!--                    </el-carousel>-->

<!--                    <h1>参天大树 考试系统 </h1>-->
                </el-main>

                <iframe  id="iframe" name="iframe"	style="height:800px"
                        frameborder="0" :src="iframepagename"></iframe>


                <el-footer>

                    <footer style="text-align: center">

                        <strong>Copyright &copy; 2020-2021 <a href="javascript:;">www.kakinakajima.com</a>.</strong> author by kakinakajima.
                        <br/>
                        <div style="padding: 1px 2px">
                            <b>Version</b> kaki_exam 3.0
                        </div>
                    </footer>

                </el-footer>
            </el-container>
        </el-container>
    </el-container>
</div>


    <!-- 头像上传窗口-->
    <div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel">头像上传</h3>
                </div>
                <div class="modal-body">
                    <table class="table table-bordered table-striped">

                        <tr>
                            <td>头像</td>
                            <td>
                                <table>
                                    <tr>
                                        <td><input type="file" id="file"/>
                                            <button class="btn btn-primary"
                                                    @click="uploadAvatar()"
                                                    type="button">上传
                                            </button>
                                        </td>
                                        <td><img :src="avatar" width="100%"></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-success" data-dismiss="modal" @click="seveOrUpdate()" aria-hidden="true">保存
                    </button>
                    <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
                </div>
            </div>
        </div>
    </div>
</body>
</html>